// custom-tab-bar/index.ts
Component({

  /**
   * 页面的初始数据
   */
  data: {
    selected: 0,
    color: "#201431",
    selectedColor: "#ffffff",
    tabList: [
      {
        icon: "/images/tab-home.svg",
        selectedIcon: "/images/tab-home-selected.svg",
        pagePath: "/pages/gallery/gallery",
        text: "展厅",
      },
      {
        icon: "/images/tab-file.svg",
        selectedIcon: "/images/tab-file-selected.svg",
        pagePath: "/pages/social-circle/social-circle",
        text: "交流圈",
      },
      {
        icon: "/images/tab-user.svg",
        selectedIcon: "/images/tab-user-selected.svg",
        pagePath: "/pages/user/user",
        text: "我的",
      }
    ]
  },
  methods: {
    handleTabChange(e: any) {
      const { url } = e.currentTarget.dataset;
      wx.switchTab({ url: url })
    }
  }
})